package com.jielihaofeng.listener;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.listener.api.ChannelAwareMessageListener;
import org.springframework.stereotype.Component;

/**
 * @author Johnnie Wind
 * @description 服务质量保障监听器
 * 1. ack 改为手动确认
 * 2. listener-container 配置属性：prefecth = 1，标识消费端每次拉取一条消息来消费，知道手动确认消息消费完毕后才会拉取下一条消息来消费
 * @date 2021/12/2 11:35
 */
@Component
public class QosListener implements ChannelAwareMessageListener {

    @Override
    public void onMessage(Message message, Channel channel) throws Exception {

    }
}
